import request from '@/utils/request'

//封装用户注册请求
export const userRegisterService = ({ username, password, repassword }) => {
  return request({
    url: '/api/reg',
    method: 'post',
    data: {
      username,
      password,
      repassword,
    },
  })
}
//封装用户登录请求
export const userLoginService = ({ username, password }) => {
  return request({
    url: '/api/login',
    method: 'post',
    data: {
      username,
      password,
    },
  })
}
//封装获取个人信息
export const userGetUserInfoService = () => {
  return request({
    url: '/my/userinfo',
  })
}
